﻿<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1, shrink-to-fit=no, user-scalable=no, viewport-fit=cover"
    />
    <meta name="theme-color" content="#000000" />
    <!--
      manifest.json provides metadata used when your web app is added to the
      homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
    -->
    <link id="favicon" rel="shortcut icon" sizes="any" href="favicon.ico" />
    <link id="favicon-icon" rel="icon" href="favicon.ico" />

    <link rel="manifest" href="/manifest.json" />
    <!-- Tell the browser it's a PWA -->
    <!-- <meta name="mobile-web-app-capable" content="yes" /> -->
    <!-- Tell iOS it's a PWA -->
    <!-- <meta name="apple-mobile-web-app-capable" content="yes" /> -->
    <!-- <link rel="apple-touch-icon" href="../../../public/appIcon-180.png" /> -->

    <!--
      Notice the use of %PUBLIC_URL% in the tags above.
      It will be replaced with the URL of the `public` folder during the build.
      Only files inside the `public` folder can be referenced from the HTML.

      Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
      work correctly both with client-side routing and a non-root public URL.
      Learn how to configure a non-root public URL by running `npm run build`.
    -->

    <meta name="react-apple-itunes-app" content="app-id=944896972" />
    <meta
      name="react-google-play-app"
      content="app-id=com.onlyoffice.documents"
    />

    <link rel="apple-touch-icon" href="favicon.ico" />
    <link rel="android-touch-icon" href="favicon.ico" />

    <!-- <%= htmlWebpackPlugin.options.custom %> -->

    <style type="text/css">
      body {
        height: 100%;
        margin: 0;
        padding: 0;
        width: 100%;
        font-family: "Open Sans", sans-serif;
        font-size: 13px;
        -webkit-font-smoothing: antialiased;
      }
    </style>
    <title><%= htmlWebpackPlugin.options.title %></title>
  </head>
  <body ondragstart="return false">
    <noscript> You need to enable JavaScript to run this app. </noscript>

    <div id="root"></div>
    <!--
      This HTML file is a template.
      If you open it directly in the browser, you will see an empty page.

      You can add webfonts, meta tags, or analytics to this file.
      The build step will place the bundled scripts into the <body> tag.

      To begin the development, run `npm start` or `yarn start`.
      To create a production bundle, use `npm run build` or `yarn build`.
    -->
    <script src="/static/scripts/browserDetector.js"></script>
    <script>
      console.log("It's WEB CLIENT INIT");
      fetch("/static/scripts/config.json")
        .then((response) => {
          if (!response.ok) {
            throw new Error("HTTP error " + response.status);
          }
          return response.json();
        })
        .then((config) => {
          window.DocSpaceConfig = {
            ...config,
          };
        })
        .catch((e) => {
          console.error(e);
        });
    </script>
  </body>
</html>
